<?php 
	echo form_open('a_kelas/save', array('id' => 'SaveAturKelas')); 
?>
	<div class="row">
	
		<div class="col-md-12">
		<input type="hidden" name="id_m_th_ajaran" value="<?php foreach ($list_th as $row_th) {echo $idth = $row_th->id_m_th_ajaran;};?>"/>					  
		
		<div class="input-group">
		<span class="input-group-addon group-addon-elba b-hijau-muda">Kelas</span>
		<select name="id_m_kelas" class="form-control form-elba input-sm" <?php if(count($list_kelas)<1){echo "disabled";}?>>
			<?php 
				if(count($list_kelas)>0){
					foreach ($list_kelas as $row_kelas){ 
			?>
				<option value="<?php echo $row_kelas->id_m_kelas; ?>"><?php echo $row_kelas->kelas; ?></option>
			<?php 
					}
				}else{
			?>
				<option value="null">Tidak ada data kelas</option>
			<?php
				}
			?>
		</select>
		<span class="input-group-addon group-addon-elba-tengah group-addon-elba b-hijau-muda ">Wali Kelas</span>
		<select name="id_m_pegawai" class="form-control form-elba input-sm" <?php if(count($list_pegawai)<1){echo "disabled";}?>>
			<?php 
				if(count($list_pegawai)>0){
					foreach ($list_pegawai as $row_peg){ 
			?>
				<option value="<?php echo $row_peg->id_m_pegawai; ?>"><?php echo $row_peg->nama_lengkap; ?></option>
			<?php 
					}
				}else{
			?>
				<option value="null">Tidak ada data pegawai</option>
			<?php
				}
			?>
		</select>
		</div>
		
		</div>
	</div><br/><br/>

	<span id="loadingAdd" style="display:none;">Sedang memproses..</span>
	<span id="errorAdd" style="display:none;color:red;">Ma'af, gagal menambahkan data</span>
	
	<span class="pull-right">
		<button type="submit" id="saveButton" class="btn btn-xs tmb-utama <?php if(count($list_kelas)<1 || count($list_pegawai)<1 ){echo "sembunyi";} ?>"> Simpan</button> 
		<button class="btn tmb-kedua close-reveal-modal close-modal"> Batal</button>
	</span>

<?php 
	echo form_close();
?>	